﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Data;
using System.Data.SqlClient;

namespace MvcCreditoHipotecario.Controllers
{
    public class SoliValidasController : Controller
    {
      

        //public ActionResult Index()
        //{
        //    return View();
        //}

        public static DataTable SoliValidadas()
        {
            DataTable dt = null;
            try
            {
                using (SqlConnection conn = new SqlConnection("data source=(local);initial catalog=creditoHipotecario;persist security info=True;user id=sa;password=sql;"))
                {
                    conn.Open();
                    SqlCommand cmd = new SqlCommand { CommandText = "USP_SOLICITUDES_VALIDADAS", Connection = conn, CommandType = CommandType.StoredProcedure };
                    SqlDataAdapter da = new SqlDataAdapter(cmd);
                    dt = new DataTable();
                    da.Fill(dt);
                }
            }
            catch
            {
            }
            return dt;
        }

    }
}
